;(() => {
  "use strict"
  var e = o(90933)
  class EngineContext {
    constructor(e) {
      ;(this.fetchedModules = []),
        (this.engine = e),
        (this.messageBus = e.msgBus),
        (this.market = new MarketContext(e.market)),
        (this.commandBinder = e.commandBinder),
        (this.getModuleSync = e.getModuleSync.bind(e)),
        (this.addComponent = e.addComponent.bind(e)),
        (this.getComponentByType = e.getComponentByType.bind(e)),
        (this.getComponents = e.getComponents.bind(e)),
        (this.removeComponent = e.removeComponent.bind(e)),
        (this.subscribe = e.subscribe.bind(e)),
        (this.unsubscribe = e.unsubscribe.bind(e)),
        (this.broadcast = e.broadcast.bind(e)),
        (this.claimRenderLayer = e.claimRenderLayer.bind(e)),
        (this.getRenderLayer = e.getRenderLayer.bind(e)),
        (this.disposeRenderLayer = e.disposeRenderLayer.bind(e)),
        (this.startGenerator = e.startGenerator.bind(e)),
        (this.stopGenerator = e.stopGenerator.bind(e)),
        (this.after = e.after.bind(e)),
        (this.deactivate = e.deactivate.bind(e)),
        (this.toggleRendering = e.toggleRendering.bind(e)),
        (this.getXrFrame = e.getXrFrame.bind(e))
    }
    getModule(e) {
      const t = Date.now()
      return this.engine.getModule(e).then(e => {
        const i = Date.now()
        return (
          this.fetchedModules.push({
            moduleName: e.name,
            isModule: !0,
            startAwait: t,
            finishAwait: i
          }),
          e
        )
      })
    }
    getModuleBySymbol(e) {
      const t = Date.now()
      return this.engine.getModuleBySymbol(e).then(e => {
        const i = Date.now()
        return (
          this.fetchedModules.push({
            moduleName: e.name,
            isModule: !0,
            startAwait: t,
            finishAwait: i
          }),
          e
        )
      })
    }
    getLoadedDependencies() {
      return [...this.fetchedModules, ...this.market.getLoadedDependencies()]
    }
    get msgBus() {
      return this.messageBus
    }
  }
  class MarketContext {
    constructor(e) {
      ;(this.fetchedData = []),
        (this.market = e),
        (this.register = e.register.bind(e)),
        (this.unregister = e.unregister.bind(e)),
        (this.tryGetData = e.tryGetData.bind(e)),
        (this.getModuleNameFromData = e.getModuleNameFromData.bind(e))
    }
    waitForData(t) {
      const i = Date.now()
      return this.market.waitForData(t).then(t => {
        const n = Date.now()
        return (
          this.fetchedData.push({
            moduleName: this.getModuleNameFromData((0, e.oL)(t)),
            isModule: !1,
            startAwait: i,
            finishAwait: n
          }),
          t
        )
      })
    }
    getLoadedDependencies() {
      return this.fetchedData
    }
  }
  var t = o(64185),
    i = o(88512)
  const n = new i.Z("module-loader")
  var s
  !(function (e) {
    ;(e[(e.Registered = 0)] = "Registered"), (e[(e.Loading = 1)] = "Loading"), (e[(e.Initialized = 2)] = "Initialized"), (e[(e.Unloaded = 3)] = "Unloaded")
  })(s || (s = {}))
  class ModuleLoader {
    constructor() {
      ;(this.registeredModules = {}), (this.typeLookup = new e.cj())
    }
    registerModule(e, i) {
      const n = this.typeLookup.addType(e),
        r = {
          es6ModulePromise: i,
          ctorPromise: new t.Q(),
          initPromise: new t.Q(),
          state: s.Registered
        }
      this.registeredModules[n] = r
    }
    getTypeID(e) {
      const t = this.typeLookup.getKeyByType(e)
      if (!t) throw Error("Trying to access unregistered Module")
      return t
    }
    getTypeFromTypeID(e) {
      return this.typeLookup.getTypeByKey(e)
    }
    moduleRegistered(e) {
      return !!this.typeLookup.getKeyByType(e)
    }
    moduleLoaded(e) {
      if (!this.moduleRegistered(e)) return !1
      const t = this.typeLookup.getKeyByType(e),
        i = this.registeredModules[t].state
      return ![s.Registered, s.Unloaded].includes(i)
    }
    getModule(t) {
      const i = this.typeLookup.getKeyByType(t)
      if (!i) throw Error(`Trying to get ${(0, e.HS)(t)} before it was registered!`)
      if (this.registeredModules[i].state === s.Unloaded) throw Error(`${(0, e.HS)(t)} module unloaded`)
      return this.registeredModules[i].initPromise.nativePromise()
    }
    getModuleSync(t) {
      const i = this.typeLookup.getKeyByType(t)
      if (!i) throw new Error(`Trying to get ${(0, e.HS)(t)} before it was registered!`)
      const n = this.registeredModules[i]
      if (n.state !== s.Initialized || void 0 === n.module) throw Error(`${(0, e.HS)(t)} module not loaded!`)
      return n.module
    }
    loadModule(t, i, r = {}) {
      const o = this.typeLookup.getKeyByType(i)
      if (!o) throw Error(`Attempting to load an unregistered module ${(0, e.HS)(i)}`)
      const a = this.registeredModules[o]
      if (a.state === s.Initialized) return a
      if (a.state !== s.Registered && a.state !== s.Unloaded) throw Error(`${(0, e.HS)(i)} already loading`)
      a.state = s.Loading
      const l = (0, e.HS)(i)
      return (
        a
          .es6ModulePromise(l)
          .then(o => {
            if (!o.default) throw new Error(`${(0, e.HS)(i)} has no default export during module loading`)
            const l = new o.default()
            a.ctorPromise.resolve(l).then(() => {
              const e = Date.now()
              let i = !1
              setTimeout(() => {
                i || n.debug(`${l.name} init took over 2 seconds`)
              }, 2e3),
                l
                  .init(r, t)
                  .then(() => {
                    n.debug(`${l.name} init took ${(Date.now() - e) / 1e3} secs.`),
                      (i = !0),
                      (a.state = s.Initialized),
                      (a.module = l),
                      a.initPromise.resolve(l)
                  })
                  .catch(e => {
                    a.initPromise.reject(e)
                  })
            })
          })
          .catch(t => {
            n.error(`Failed to load es6Module for ${(0, e.HS)(i)}: ${t}`), a.initPromise.reject(t)
          }),
        a
      )
    }
    whenQueueEmpties() {
      const e = []
      for (const t in this.registeredModules) {
        const i = this.registeredModules[t]
        i.state === s.Loading && e.push(i.initPromise)
      }
      return t.Q.all(e).nativePromise()
    }
    unloadModule(e) {
      const i = this.typeLookup.getKeyByType(e)
      if (!i) throw Error("Attempting to unload unregistered module")
      const n = this.registeredModules[i]
      if (n.state === s.Unloaded || n.state === s.Registered) throw Error("Attempting to unload not-loaded module")
      ;(n.state = s.Unloaded), (n.ctorPromise = new t.Q()), (n.initPromise = new t.Q()), (n.module = void 0)
    }
  }
  const r = "Data not present.",
    a = new i.Z("market")
  class Market {
    constructor() {
      ;(this.typeLookup = new e.cj()), (this.store = {}), (this.moduleRegistry = {}), (this.firstUpdatePromises = {})
    }
    register(e, t, i) {
      const n = this.typeLookup.getKeyByType(t, !0)
      if (this.moduleRegistry[n]) throw Error("Data can only be registered to one Module")
      ;(this.moduleRegistry[n] = e),
        (this.store[n] = i),
        i.commit(),
        this.firstUpdatePromises[n] && (this.firstUpdatePromises[n].resolve(this.store[n]), delete this.firstUpdatePromises[n])
    }
    unregister(e, t) {
      const i = this.typeLookup.getKeyByType(t, !0)
      if (!this.moduleRegistry[i]) throw Error("No Data was registered to the Module")
      delete this.moduleRegistry[i], delete this.store[i]
    }
    getData(e) {
      const t = this.typeLookup.getKeyByType(e)
      if (t in this.store) return this.store[t]
      throw Error(r)
    }
    waitForData(e) {
      const n = this.typeLookup.getKeyByType(e, !0)
      return n in this.store
        ? Promise.resolve(this.store[n])
        : (this.firstUpdatePromises[n] ||
            ((this.firstUpdatePromises[n] = new t.Q()),
            setTimeout(() => {
              i.Z.level >= 3 && !(n in this.store) && a.debug(`still waiting for ${e.name}-data after 5 seconds`)
            }, 5e3)),
          this.firstUpdatePromises[n].nativePromise())
    }
    tryGetData(e) {
      try {
        return this.getData(e)
      } catch (e) {
        if (e.message !== r) throw (a.error("tryGetData", e.message), e)
      }
      return null
    }
    debugData() {
      const e = {}
      for (const t in this.moduleRegistry) {
        const i = this.moduleRegistry[t]
        i && (e[i.name] || (e[i.name] = []), e[i.name].push(this.store[t]))
      }
      return Object.freeze(e)
    }
    getModuleNameFromData(e) {
      const t = this.typeLookup.getKeyByType(e)
      if (t) {
        const e = this.moduleRegistry[t]
        if (e) return e.name
      }
      throw Error(r)
    }
  }
  var l = o(63432)
  const c = new i.Z("command-binder")
  class CommandBinder {
    constructor() {
      ;(this.typeLookup = new e.cj()),
        (this.bindings = {}),
        (this.queuedCommands = {}),
        (this.hookedCommands = {}),
        (this.resetHooks = () => {
          this.hookedCommands = {}
        }),
        (this.issueCommand = this.issueCommand.bind(this)),
        (this.issueCommandWhenBound = this.issueCommandWhenBound.bind(this))
    }
    addBinding(e, t) {
      const i = this.typeLookup.getKeyByType(e, !0)
      if (this.bindings[i]) throw Error(`Command ${i} already bound to a callback`)
      ;(this.bindings[i] = t), this.callQueuedCommands(i)
      return {
        renew: () => {
          this.bindings[i] !== t && this.addBinding(e, t)
        },
        cancel: () => this.removeBinding(e, t),
        active: this.bindings[i] === t
      }
    }
    removeBinding(e, t) {
      const i = this.typeLookup.getKeyByType(e)
      if (!i) return void c.debug("Trying to unbind unbound command")
      this.bindings[i] === t ? delete this.bindings[i] : c.debug("Trying to unbind unbound callback")
    }
    issueCommand(e, t = !0) {
      const i = this.typeLookup.getKeyByInstance(e),
        n = this.bindings[i]
      return n ? this.issueCommandHelper(e, i, n, t) : Promise.reject("Command not bound: " + e.id)
    }
    issueCommandHelper(e, t, i, n = !0) {
      return this.hookedCommands[t] && !this.hookedCommands[t].resolving ? this.issueHookCommand(e, t) : i(e.payload)
    }
    issueCommandWhenBound(e) {
      const i = new t.Q()
      return (
        this.issueCommand(e)
          .then(e => i.resolve(e))
          .catch(t => {
            const n = this.typeLookup.getKeyByInstance(e, !0)
            this.queuedCommands[n] || (this.queuedCommands[n] = []), this.queuedCommands[n].push({ command: e, deferred: i })
          }),
        i.nativePromise()
      )
    }
    callQueuedCommands(e) {
      const t = []
      this.queuedCommands[e] &&
        (this.queuedCommands[e].forEach(e => {
          t.push(this.issueCommand(e.command).then(t => e.deferred.resolve(t)))
        }),
        Promise.all(t).then(() => {
          delete this.queuedCommands[e]
        }))
    }
    hookCommand(e, t, i) {
      const n = this.typeLookup.getKeyByType(e, !0)
      if (this.hookedCommands[n]) {
        if (t && null !== this.hookedCommands[n].preCommandCallback) throw Error(`Command ${e.name} has already been pre hooked`)
        if (!t && null !== this.hookedCommands[n].postCommandCallback) throw Error(`Command ${e.name} has already been post hooked`)
      } else
        this.hookedCommands[n] = {
          preCommandCallback: null,
          postCommandCallback: null,
          resolving: !1
        }
      t ? (this.hookedCommands[n].preCommandCallback = i) : (this.hookedCommands[n].postCommandCallback = i)
    }
    async issueHookCommand(e, t) {
      const i = this.hookedCommands[t],
        n = this.bindings[t],
        s = e.payload,
        r = i.preCommandCallback,
        o = i.postCommandCallback
      try {
        r && (await r(s)), (i.resolving = !0)
        const a = await this.issueCommandHelper(e, t, n, !0)
        return (i.resolving = !1), o && (await o(s)), a
      } catch (e) {
        throw Error(`Could not completely issueHookCommand - ${e}`)
      }
    }
  }
  var h = o(84303),
    d = o(76701),
    u = o(84561),
    p = o(21479)
  class Profiler {
    constructor() {
      ;(this.phaseTimes = []),
        (this.modules = {}),
        this.addAppPhase(p.nh.UNINITIALIZED),
        (window.profilingData = {
          phaseTimes: this.phaseTimes,
          modules: this.modules
        })
    }
    addAppPhase(e) {
      this.phaseTimes[e] = Date.now()
    }
    addModuleLoadTime(e, t, i, n) {
      const s = n.map(e => e.moduleName).join(","),
        r = (n.reduce((e, t) => e + t.finishAwait - t.startAwait, 0) / (i - t)) * 100
      this.modules[e] = [e, e, null, t, i, null, r, s]
    }
  }
  var m = o(8150),
    g = o(96909)
  const f = new i.Z("engine")
  let v = h.A.End
  class Engine {
    constructor(e = !1) {
      ;(this.moduleLookup = {}),
        (this.componentLookup = {}),
        (this.deactivatedHack = !1),
        (this.currentApplication = null),
        (this.moduleProfiler = new Profiler()),
        (this.commandBinder = new CommandBinder()),
        (this.market = new Market()),
        (this.messageBus = new l.Y()),
        (this.engineGenerators = new d.ZP()),
        (this.layers = new u.o()),
        (this.moduleLoader = new ModuleLoader()),
        (this.symbolLoader = new g.m()),
        (this.afterPhasePromises = []),
        (this.afterPhaseListenerCount = []),
        this.resetPromises(),
        this.subscribe(m.LZ, e => this.moduleProfiler.addAppPhase(e.phase))
    }
    async loadApplication(e, t, i) {
      if (e === this.currentApplication) throw Error("Application already loaded")
      const n = (this.currentApplication ? this.currentApplication.getManifest() : []).map(e => e.type),
        s = e.getManifest(),
        r = s.map(e => e.type),
        o = this.currentApplication
      this.currentApplication = null
      const a = n.filter(e => -1 === r.indexOf(e)),
        l = a.filter(e => "symbol" != typeof e),
        c = a.filter(e => "symbol" == typeof e),
        h = [...l.map(e => this.unloadModule(e)), ...c.map(e => this.unloadModuleBySymbol(e))]
      o && h.push(o.unload(this))
      const d = s.filter(e => -1 === n.indexOf(e.type))
      for (const e of d)
        "symbol" == typeof e.type
          ? this.symbolLoader.moduleRegistered(e.type) || this.registerModule(e)
          : this.moduleLoader.moduleRegistered(e.type) || this.registerModule(e)
      if (h.length)
        try {
          await Promise.all(h)
        } catch (e) {
          f.error(e), t && t(e)
        }
      try {
        ;(this.currentApplication = e), await e.load(this, { coldStart: null === o, autoPlay: i })
      } catch (e) {
        f.error(e), t && t(e)
      }
    }
    registerModule(e) {
      if (this.currentApplication) throw Error("Cannot register modules while application is running")
      "symbol" == typeof e.type ? this.symbolLoader.registerModule(e.type, e.promise) : this.moduleLoader.registerModule(e.type, e.promise)
    }
    loadModule(e) {
      const t = e
      this.moduleLoadInjectionHook && (t.config = this.moduleLoadInjectionHook(t.type, t.config || {}))
      const i = new EngineContext(this),
        n = Date.now(),
        s = this.moduleLoader.loadModule(i, t.type, t.config)
      return (
        s.ctorPromise.then(
          e =>
            (this.moduleLookup[this.moduleLoader.getTypeID(t.type)] = {
              module: e,
              initialized: !1
            })
        ),
        s.initPromise.then(e => {
          this.moduleProfiler.addModuleLoadTime(e.name, n, Date.now(), i.getLoadedDependencies()),
            (this.moduleLookup[this.moduleLoader.getTypeID(t.type)].initialized = !0)
        }),
        s.initPromise.nativePromise()
      )
    }
    loadModuleBySymbol(e) {
      const t = e,
        i = String(t.type)
      this.moduleLoadInjectionHook && (t.config = this.moduleLoadInjectionHook(i, t.config || {}))
      const n = new EngineContext(this),
        s = Date.now(),
        r = this.symbolLoader.loadModule(n, t.type, t.config)
      return (
        r.ctorPromise.then(
          e =>
            (this.moduleLookup[i] = {
              symbol: t.type,
              module: e,
              initialized: !1
            })
        ),
        r.initPromise.then(e => {
          this.moduleProfiler.addModuleLoadTime(e.name, s, Date.now(), n.getLoadedDependencies()), (this.moduleLookup[i].initialized = !0)
        }),
        r.initPromise.nativePromise()
      )
    }
    setLoadInjection(e) {
      if (void 0 !== this.moduleLoadInjectionHook) throw Error("Hook already registered")
      this.moduleLoadInjectionHook = e
    }
    async unloadModule(t) {
      if (!this.moduleLoader.moduleLoaded(t)) return void f.debug(`${(0, e.HS)(t)} module already unloaded`)
      f.debug(`Unloading ${(0, e.HS)(t)} module`)
      const i = await this.getModule(t),
        n = this.getModuleIndex(i)
      this.componentLookup[n] &&
        (await Promise.all(
          this.componentLookup[n].map(async e => {
            await this.removeComponent(i, e.component), e.component.dispose()
          })
        ),
        (this.componentLookup[n] = [])),
        this.moduleLoader.unloadModule(t),
        i.dispose(this)
    }
    async unloadModuleBySymbol(e) {
      if (!this.symbolLoader.moduleLoaded(e)) return void f.debug(`${String(e)} module already unloaded`)
      f.debug(`Unloading ${String(e)} module`)
      const t = await this.getModuleBySymbol(e),
        i = this.getModuleIndex(t)
      this.componentLookup[i] &&
        (await Promise.all(
          this.componentLookup[i].map(async e => {
            await this.removeComponent(t, e.component), e.component.dispose()
          })
        ),
        (this.componentLookup[i] = [])),
        this.symbolLoader.unloadModule(e),
        t.dispose(this)
    }
    async waitForLoadingModules() {
      await Promise.all([this.moduleLoader.whenQueueEmpties(), this.symbolLoader.whenQueueEmpties()])
    }
    async getModule(e) {
      return this.moduleLoader.getModule(e)
    }
    getModuleBySymbol(e) {
      return this.symbolLoader.getModule(e)
    }
    getModuleSync(e) {
      return this.moduleLoader.getModuleSync(e)
    }
    getComponentByType(e) {
      for (const t in this.moduleLookup) {
        const i = this.moduleLookup[t].module,
          n = this.getModuleIndex(i),
          s = this.componentLookup[n] || []
        for (const t of s) if (t.component instanceof e) return t.component
      }
      return null
    }
    async addComponent(e, t) {
      const i = this.getModuleIndex(e)
      let n = this.componentLookup[i]
      n || (this.componentLookup[i] = n = [])
      let s = -1
      for (let e = 0; e < n.length; e++)
        if (n[e].component === t) {
          s = e
          break
        }
      if ((-1 === s && ((s = n.push({ component: t, active: !1 }) - 1), t.init()), n[s].active))
        throw Error("Tried to add already active component: " + typeof t)
      await t.activate(this), (n[s].active = !0)
    }
    async removeComponent(e, t) {
      const i = this.getModuleIndex(e),
        n = this.componentLookup[i]
      if (n) {
        let e = null
        for (const i of n)
          if (i.component === t) {
            e = i
            break
          }
        e && e.active && (await t.deactivate(this), (e.active = !1))
      }
    }
    tick() {
      if (this.deactivatedHack) return
      if (v !== h.A.End) throw Error("Engine.tick called outside of waiting. Did the engine get called recursively?!")
      ;(v = h.A.Begin), this.resolveAfterPhase(h.A.Begin)
      const e = performance.now(),
        t = this.lastTick ? e - this.lastTick : 16
      ;(this.lastTick = e), (v = h.A.Logic)
      try {
        for (const e in this.moduleLookup) {
          const i = this.moduleLookup[e]
          i && i.initialized && i.module.onUpdate(t)
        }
      } catch (e) {
        throw (f.error(e), e)
      }
      this.resolveAfterPhase(h.A.Logic), this.engineGenerators.processGenerators(d.p3.Phase, h.A.Logic)
      try {
        this.renderComponents(t)
      } catch (e) {
        throw (f.error(e), e)
      }
      try {
        ;(v = h.A.Render),
          this.resolveAfterPhase(h.A.Render),
          this.engineGenerators.processGenerators(d.p3.Phase, h.A.Render),
          (v = h.A.End),
          this.resolveAfterPhase(h.A.End),
          this.engineGenerators.processGenerators(d.p3.None),
          this.engineGenerators.processGenerators(d.p3.Promise),
          this.engineGenerators.processGenerators(d.p3.Duration)
      } catch (e) {
        throw (f.error(e), e)
      }
    }
    subscribe(e, t, i = l.Q.PERMANENT) {
      return this.messageBus.subscribe(e, t, i)
    }
    unsubscribe(e, t) {
      this.messageBus.unsubscribe(e, t)
    }
    broadcast(e) {
      this.messageBus.broadcast(e)
    }
    claimRenderLayer(e) {
      return this.layers.claimLayer(e)
    }
    getRenderLayer(e) {
      return this.layers.getLayer(e)
    }
    disposeRenderLayer(e) {
      this.layers.disposeLayer(e)
    }
    startGenerator(e) {
      this.engineGenerators.startGenerator(e)
    }
    stopGenerator(e) {
      this.engineGenerators.stopGenerator(e)
    }
    after(e) {
      return this.afterPhaseListenerCount[e]++, this.afterPhasePromises[e].nativePromise()
    }
    getModuleIndex(e) {
      for (const t in this.moduleLookup) if (this.moduleLookup[t] && this.moduleLookup[t].module === e) return t
      return ""
    }
    *getComponents() {
      for (const e in this.moduleLookup) {
        const t = this.componentLookup[e]
        if (t) for (const e of t) yield e
      }
    }
    toggleRendering(e, t) {
      const i = this.getModuleIndex(e),
        n = this.componentLookup[i]
      if (n) for (const e of n) e.active = t
    }
    renderComponents(e) {
      for (const t in this.moduleLookup) {
        const i = this.componentLookup[t]
        if (i) for (const t of i) t.active && t.component.beforeRender && t.component.beforeRender(e)
      }
      for (const t in this.moduleLookup) {
        if (!t) continue
        const i = this.componentLookup[t]
        if (i) for (const t of i) t.active && t.component.render(e)
      }
    }
    resetPromises() {
      this.resetAfterPhasePromises()
    }
    resetAfterPhasePromises() {
      this.resetAfterPhasePromise(h.A.Logic),
        this.resetAfterPhasePromise(h.A.Render),
        this.resetAfterPhasePromise(h.A.Begin),
        this.resetAfterPhasePromise(h.A.End)
    }
    resetAfterPhasePromise(e) {
      ;(this.afterPhasePromises[e] = new t.Q()), (this.afterPhaseListenerCount[e] = 0)
    }
    resolveAfterPhase(e) {
      this.afterPhaseListenerCount[e] > 0 && (this.afterPhasePromises[e].resolve(), this.resetAfterPhasePromise(e))
    }
    deactivate() {
      for (const e in this.moduleLookup) {
        const t = this.moduleLookup[e]
        if (t && t.initialized)
          if (t.symbol) this.unloadModuleBySymbol(t.symbol)
          else {
            const e = this.getModuleType(t.module)
            e && this.unloadModule(e)
          }
      }
      this.deactivatedHack = !0
    }
    setXrFrame(e) {
      this.xrFrame = e
    }
    getXrFrame() {
      return this.xrFrame
    }
    getModuleType(e) {
      for (const t in this.moduleLookup) {
        const i = this.moduleLookup[t]
        if (i && i.module === e) return this.moduleLoader.getTypeFromTypeID(t)
      }
      return null
    }
    get msgBus() {
      return this.messageBus
    }
  }
  var y = o(36822),
    b = o(41596),
    S = o(60771),
    E = o(44218),
    T = o(8445),
    w = o(54791),
    _ = o(18469),
    M = o(56365),
    x = o(46072),
    A = o(20664),
    O = o(4305),
    D = o(29539),
    C = o(66542),
    P = o(20331),
    I = o(77719),
    N = o(56656),
    L = o(23889),
    R = o(20021),
    k = o(2640),
    B = o(81220),
    U = o(15030),
    F = o(55402),
    V = o(31778),
    H = o(55305),
    G = o(24930),
    z = o(69941),
    W = o(37238),
    j = o(93263),
    K = o(17399),
    q = o(66225),
    Z = o(84285),
    Y = o(54177),
    $ = o(94625),
    Q = o(63781),
    X = o(44055),
    J = o(17206),
    ee = o(62881),
    te = o(55130),
    ie = o(42952),
    ne = o(86122),
    se = o(87738),
    re = o(92895),
    oe = o(32470),
    ae = o(50294),
    le = o(26589),
    ce = o(13988),
    he = o(12805),
    de = o(13827),
    ue = o(31657)
  const pe = o(65307).default
  var me = o(39300),
    ge = o(41452),
    fe = o(65006),
    ve = o(67394),
    ye = o(94329),
    be = o(27088),
    Se = o(70384),
    Ee = o(94015),
    Te = o(19917),
    we = o(86097),
    _e = o(55034),
    Me = o(16400),
    xe = o(51561),
    Ae = o(32086),
    Oe = o(32306),
    De = o(11426),
    Ce = o(63739),
    Pe = o(35597),
    Ie = o(7562),
    Ne = o(70273),
    Le = o(28926),
    Re = o(36210),
    ke = o(41591),
    Be = o(76541),
    Ue = o(14880),
    Fe = o(79355),
    Ve = o(35300)
  const He = new i.Z("AB")
  class AB {
    constructor(e) {
      this.values = {}
      for (const t in e) {
        const i = e[t]
        if (i && i.ab)
          try {
            this.values[t] = Ge(i.ab)
          } catch (e) {
            He.warn(`Skipping key ${t}, could not pick: ${e}`)
          }
      }
    }
    get(e) {
      return this.values[e]
    }
    serialize() {
      return Object.keys(this.values).map(e => `${e}:${this.values[e]}`)
    }
  }
  function Ge(e) {
    if (0 === e.length) throw Error("A/B cannot choose from an empty choice array")
    let t = 0
    for (const i of e) {
      if (void 0 === i.value || void 0 === i.weight || i.weight < 0) throw Error(`Malformed AB choice: ${i}`)
      t += i.weight
    }
    const i = Math.random() * t
    let n = 0
    for (const t of e) if (((n += t.weight), i <= n)) return t.value
  }
  var ze = o(2388),
    We = o(44060),
    je = o(23502),
    Ke = o(39504),
    qe = o(87182),
    Ze = o(30060),
    Ye = o(28963),
    $e = o(66999),
    Qe = o(77037),
    Xe = o(73844),
    Je = o(69808),
    et = o(20601),
    tt = o(80301),
    it = o(40324),
    nt = o(17838),
    st = o(34369)
  const rt = new i.Z("showcase-settings/quality")
  var ot = o(24844),
    at = o(37381),
    lt = o(96216),
    ct = o(29422),
    ht = o(10757),
    dt = o(23847),
    ut = o(68655),
    pt = o(89683),
    mt = o(95469)
  class EngineTick {
    constructor(e, t, i) {
      ;(this.engine = e),
        (this.onErrorCallback = i),
        (this.ticking = !1),
        (this.start = () => {
          this.ticking = !0
        }),
        (this.stop = () => {
          this.ticking = !1
        }),
        (this.tick = (e, t) => {
          if (this.ticking)
            try {
              this.engine.setXrFrame(t), this.engine.tick()
            } catch (e) {
              this.stop(), this.onErrorCallback(e)
            }
        }),
        t.setAnimationLoop(this.tick)
    }
  }
  var gt = o(26587),
    ft = o(38420),
    vt = o(50988),
    yt = o(44283)
  class ControllerProxy {
    constructor(e, t) {
      ;(this.proxy = e), (this.target = t)
    }
    beginExternalTransition() {
      this.proxy.activeSession(this) && this.target.beginExternalTransition()
    }
    endExternalTransition() {
      this.proxy.activeSession(this) && this.target.endExternalTransition()
    }
    updateCameraPosition(e) {
      this.proxy.activeSession(this) && this.target.updateCameraPosition(e)
    }
    updateCameraRotation(e) {
      this.proxy.activeSession(this) && this.target.updateCameraRotation(e)
    }
    updateCameraFocus(e) {
      this.proxy.activeSession(this) && this.target.updateCameraFocus(e)
    }
    moveTo(e) {
      return this.proxy.activeSession(this) ? this.target.moveTo(e) : t.Q.resolve()
    }
  }
  class CameraPoseProxy {
    constructor(e, t) {
      ;(this.controller = e), (this.data = t), (this.proxies = [])
    }
    get pose() {
      return this.data
    }
    activeSession(e) {
      if (0 === this.proxies.length) return !1
      return this.proxies[this.proxies.length - 1].controller === e
    }
    newSession(e) {
      let t = null
      if (-1 !== this.proxies.findIndex(t => t.requester === e)) throw new Error("Cannot create two sessions with the same requester")
      return (0, yt.k1)(
        () => {
          if (!t) {
            if (this.proxies.length > 0) {
              const e = this.proxies[this.proxies.length - 1]
              e.requester.onAccessRevoked(e.controller)
            }
            ;(t = new ControllerProxy(this, this.controller)), this.proxies.push({ controller: t, requester: e }), e.onAccessGranted(t)
          }
        },
        () => {
          if (t) {
            const e = this.proxies.findIndex(e => e.controller === t)
            if (-1 !== e) {
              const t = this.proxies[e],
                i = e === this.proxies.length - 1
              if ((i && t.requester.onAccessRevoked(t.controller), this.proxies.splice(e, 1), this.proxies.length > 0 && i)) {
                const e = this.proxies[this.proxies.length - 1]
                e.requester.onAccessGranted(e.controller)
              }
            }
          }
        }
      )
    }
  }
  var bt = o(59088)
  var St = o(81063),
    Et = o(80693),
    Tt = o(35934),
    wt = o(73710),
    _t = o(51058)
  var Mt = o(87220)
  const xt = new i.Z("showcase"),
    At = window.MP_PREFETCHED_MODELDATA
  class Showcase {
    constructor(e, i = {}, n = !1) {
      ;(this.inWorkshop = e),
        (this.settingOverrides = i),
        (this.editModePreferred = n),
        (this.externalCanvas = !1),
        (this.urlValues = S.AO()),
        (this.storeQueue = new P.RequestQueue()),
        (this.apiQueue = new P.RequestQueue()),
        (this.analyticsQueue = new P.RequestQueue({ concurrency: 1 })),
        (this.errorPromise = new t.Q()),
        (this.quickstart = "1" === this.urlValues.qs || void 0 !== this.urlValues.note),
        (this.autoplay = !1),
        (this.forceLogin = !1),
        (this.openingNote = !1),
        (this.needsFramebustToPlayXR = !0),
        (this.uiLoading = Promise.resolve()),
        (this.stopTourHook = async e => {
          const t = e.market.tryGetData(z.k3)
          t && t.tourPlaying && (await e.commandBinder.issueCommand(new lt.vy()), await (0, ht.gw)(10))
        })
      const { container: s } = this.settingOverrides
      ;(0, Tt.C)(this.urlValues.applicationKey || null),
        (this.apiHost = ((e, t) => {
          const i = e.apiHost || t.apiHost
          if (i) {
            const e = (0, fe.KK)(i)
            if (e) return e
          }
          return window.location.origin
        })(this.urlValues, this.settingOverrides)),
        i.canvas && ((this.externalCanvas = !0), (this.canvas = i.canvas)),
        this.apiHost !== window.location.origin && (this.settingOverrides.apiHost = this.apiHost),
        (this.container = s || document.body),
        (this.modelUrls = (0, fe.sU)(this.urlValues.m || this.urlValues.model, this.apiHost)),
        (this.modelUrl = `${this.modelUrls.urlBase}/api/v1/player/models/${this.modelUrls.sid}`),
        (this.modelId = this.modelUrls.sid)
    }
    getManifest() {
      const e = [
        {
          type: y.default,
          promise: () => Promise.resolve().then(o.bind(o, 36822))
        },
        {
          type: G.default,
          promise: () => Promise.resolve().then(o.bind(o, 24930))
        },
        {
          type: dt.default,
          promise: () => Promise.resolve().then(o.bind(o, 23847))
        },
        {
          type: g.y.SDK,
          promise: () => Promise.resolve().then(o.bind(o, 24025))
        },
        {
          type: B.default,
          promise: () => Promise.resolve().then(o.bind(o, 81220))
        },
        {
          type: k.default,
          promise: () => Promise.resolve().then(o.bind(o, 2640))
        },
        {
          type: be.default,
          promise: () => Promise.resolve().then(o.bind(o, 27088))
        },
        {
          type: C.default,
          promise: () => Promise.resolve().then(o.bind(o, 66542))
        },
        {
          type: E.default,
          promise: () => Promise.resolve().then(o.bind(o, 44218))
        },
        {
          type: K.default,
          promise: () => Promise.resolve().then(o.bind(o, 17399))
        },
        {
          type: M.default,
          promise: () => Promise.resolve().then(o.bind(o, 56365))
        },
        {
          type: x.default,
          promise: () => Promise.resolve().then(o.bind(o, 46072))
        },
        {
          type: ge.default,
          promise: () => Promise.resolve().then(o.bind(o, 41452))
        },
        {
          type: N.default,
          promise: () => Promise.resolve().then(o.bind(o, 56656))
        },
        {
          type: g.y.SHOWCASE_ANALYTICS,
          promise: () => Promise.resolve().then(o.bind(o, 45386))
        },
        {
          type: g.y.WEBGL_RENDERER,
          promise: () => Promise.resolve().then(o.bind(o, 42090))
        },
        {
          type: b.default,
          promise: () => Promise.resolve().then(o.bind(o, 41596))
        },
        this.externalCanvas
          ? {
              type: g.y.CANVAS,
              promise: () => Promise.resolve().then(o.bind(o, 37554))
            }
          : {
              type: g.y.CANVAS,
              promise: () => Promise.resolve().then(o.bind(o, 86718))
            },
        {
          type: g.y.INPUT,
          promise: () => Promise.resolve().then(o.bind(o, 5107))
        },
        {
          type: Ee.default,
          promise: () => Promise.resolve().then(o.bind(o, 94015))
        },
        {
          type: I.default,
          promise: () => Promise.resolve().then(o.bind(o, 77719))
        },
        {
          type: mt.default,
          promise: () => Promise.resolve().then(o.bind(o, 95469))
        },
        {
          type: gt.F,
          promise: () => Promise.resolve().then(o.bind(o, 37339))
        },
        {
          type: de.default,
          promise: () => Promise.resolve().then(o.bind(o, 13827))
        },
        {
          type: w.default,
          promise: () => Promise.all([o.e(947), o.e(321)]).then(o.bind(o, 54791))
        },
        {
          type: L.default,
          promise: () => Promise.all([o.e(947), o.e(321)]).then(o.bind(o, 23889))
        },
        {
          type: W.default,
          promise: () => Promise.all([o.e(947), o.e(321)]).then(o.bind(o, 37238))
        },
        {
          type: g.y.MODEL_MESH,
          promise: () => Promise.all([o.e(947), o.e(321)]).then(o.bind(o, 28745))
        },
        {
          type: j.default,
          promise: () => Promise.all([o.e(947), o.e(321)]).then(o.bind(o, 93263))
        },
        {
          type: De.default,
          promise: () => Promise.all([o.e(947), o.e(321)]).then(o.bind(o, 11426))
        },
        {
          type: q.default,
          promise: () => Promise.all([o.e(947), o.e(321)]).then(o.bind(o, 66225))
        },
        {
          type: Oe.default,
          promise: () => Promise.all([o.e(947), o.e(321)]).then(o.bind(o, 32306))
        },
        {
          type: he.default,
          promise: () => Promise.all([o.e(947), o.e(321)]).then(o.bind(o, 12805))
        },
        {
          type: Ie.default,
          promise: () => Promise.all([o.e(947), o.e(321)]).then(o.bind(o, 7562))
        },
        {
          type: pe,
          promise: () => Promise.all([o.e(947), o.e(321)]).then(o.bind(o, 65307))
        },
        {
          type: ce.default,
          promise: () => Promise.all([o.e(947), o.e(321)]).then(o.bind(o, 13988))
        },
        {
          type: ee.default,
          promise: () => Promise.all([o.e(947), o.e(321)]).then(o.bind(o, 62881))
        },
        {
          type: Fe.default,
          promise: () => Promise.all([o.e(947), o.e(321)]).then(o.bind(o, 79355))
        },
        {
          type: Z.default,
          promise: () => Promise.all([o.e(947), o.e(321)]).then(o.bind(o, 84285))
        },
        {
          type: Y.default,
          promise: () => Promise.all([o.e(947), o.e(321)]).then(o.bind(o, 54177))
        },
        {
          type: $.default,
          promise: () => Promise.all([o.e(947), o.e(321)]).then(o.bind(o, 94625))
        },
        {
          type: te.default,
          promise: () => Promise.all([o.e(947), o.e(321)]).then(o.bind(o, 55130))
        },
        {
          type: ie.default,
          promise: () => Promise.all([o.e(947), o.e(321)]).then(o.bind(o, 42952))
        },
        {
          type: g.y.ORTHOGRAPHIC_CONTROLS,
          promise: () => Promise.all([o.e(947), o.e(321)]).then(o.bind(o, 35726))
        },
        {
          type: ue.default,
          promise: () => Promise.resolve().then(o.bind(o, 31657))
        },
        {
          type: Ae.default,
          promise: () => Promise.all([o.e(947), o.e(321)]).then(o.bind(o, 32086))
        },
        {
          type: F.default,
          promise: () => Promise.all([o.e(947), o.e(321)]).then(o.bind(o, 55402))
        },
        {
          type: V.default,
          promise: () => Promise.all([o.e(947), o.e(321)]).then(o.bind(o, 31778))
        },
        {
          type: D.default,
          promise: () => Promise.all([o.e(947), o.e(321)]).then(o.bind(o, 29539))
        },
        {
          type: Ue.default,
          promise: () => Promise.all([o.e(947), o.e(321)]).then(o.bind(o, 14880))
        },
        {
          type: g.y.MESH_QUERY,
          promise: () => Promise.all([o.e(947), o.e(321)]).then(o.bind(o, 26203))
        },
        {
          type: g.y.MESH_TRIM_DATA,
          promise: () => o.e(828).then(o.bind(o, 97665))
        },
        { type: J.default, promise: () => o.e(136).then(o.bind(o, 17206)) },
        { type: Q.default, promise: () => o.e(136).then(o.bind(o, 63781)) },
        { type: X.default, promise: () => o.e(136).then(o.bind(o, 44055)) },
        {
          type: ve.default,
          promise: () => o.e(136).then(o.bind(o, 67394))
        },
        {
          type: oe.default,
          promise: () => o.e(136).then(o.bind(o, 32470))
        },
        {
          type: ae.default,
          promise: () => o.e(136).then(o.bind(o, 50294))
        },
        {
          type: ne.default,
          promise: () => o.e(136).then(o.bind(o, 86122))
        },
        {
          type: me.default,
          promise: () => o.e(136).then(o.bind(o, 39300))
        },
        {
          type: ke.default,
          promise: () => o.e(136).then(o.bind(o, 41591))
        },
        {
          type: se.default,
          promise: () => o.e(136).then(o.bind(o, 87738))
        },
        {
          type: re.default,
          promise: () => o.e(136).then(o.bind(o, 92895))
        },
        { type: R.default, promise: () => o.e(136).then(o.bind(o, 20021)) },
        {
          type: Se.default,
          promise: () => o.e(136).then(o.bind(o, 70384))
        },
        {
          type: Te.default,
          promise: () => o.e(136).then(o.bind(o, 19917))
        },
        { type: A.default, promise: () => o.e(136).then(o.bind(o, 20664)) },
        {
          type: Ce.default,
          promise: () => o.e(136).then(o.bind(o, 63739))
        },
        {
          type: le.default,
          promise: () => o.e(136).then(o.bind(o, 26589))
        },
        {
          type: ot.default,
          promise: () => o.e(136).then(o.bind(o, 24844))
        },
        {
          type: Be.default,
          promise: () => o.e(136).then(o.bind(o, 76541))
        },
        { type: O.default, promise: () => o.e(136).then(o.bind(o, 4305)) },
        {
          type: Le.default,
          promise: () => o.e(136).then(o.bind(o, 28926))
        },
        {
          type: Ne.default,
          promise: () => o.e(136).then(o.bind(o, 70273))
        },
        {
          type: Re.default,
          promise: () => o.e(136).then(o.bind(o, 36210))
        },
        {
          type: we.default,
          promise: () => o.e(136).then(o.bind(o, 86097))
        },
        {
          type: _e.default,
          promise: () => o.e(136).then(o.bind(o, 55034))
        },
        {
          type: Me.default,
          promise: () => o.e(136).then(o.bind(o, 16400))
        },
        {
          type: xe.default,
          promise: () => o.e(136).then(o.bind(o, 51561))
        },
        {
          type: g.y.MODEL_RATING,
          promise: () => o.e(136).then(o.bind(o, 76265))
        },
        {
          type: g.y.SEARCH,
          promise: () => o.e(464).then(o.bind(o, 22569))
        },
        {
          type: g.y.DWELL_ANALYTICS,
          promise: () => Promise.all([o.e(79), o.e(833)]).then(o.bind(o, 18574))
        },
        {
          type: g.y.SCAN_INFO,
          promise: () => Promise.all([o.e(79), o.e(833)]).then(o.bind(o, 96811))
        },
        {
          type: g.y.MEASUREMENT_MODE,
          promise: () => Promise.all([o.e(79), o.e(833)]).then(o.bind(o, 35165))
        },
        {
          type: g.y.TOUR_CONTROLS,
          promise: () => Promise.all([o.e(79), o.e(833)]).then(o.bind(o, 27166))
        },
        {
          type: g.y.TOUR_DATA,
          promise: () => Promise.all([o.e(79), o.e(833)]).then(o.bind(o, 81627))
        },
        {
          type: g.y.VIDEO_RECORDER,
          promise: () => Promise.all([o.e(79), o.e(833)]).then(o.bind(o, 15903))
        },
        {
          type: g.y.WEBVR,
          promise: () => Promise.all([o.e(79), o.e(833)]).then(o.bind(o, 58129))
        },
        {
          type: g.y.WEBXR,
          promise: () => Promise.all([o.e(79), o.e(833)]).then(o.bind(o, 75708))
        },
        {
          type: g.y.TRASH,
          promise: () => Promise.all([o.e(79), o.e(833)]).then(o.bind(o, 86102))
        },
        {
          type: g.y.SCENE,
          promise: () => Promise.all([o.e(764), o.e(47), o.e(423), o.e(356), o.e(584), o.e(524), o.e(371)]).then(o.bind(o, 45277))
        }
      ]
      return (
        "0" !== this.urlValues.tiles
          ? e.push({
              type: g.y.SWEEP_PANO,
              promise: () => Promise.all([o.e(79), o.e(833)]).then(o.bind(o, 52061))
            })
          : e.push({
              type: g.y.SWEEP_PANO,
              promise: () => Promise.all([o.e(79), o.e(833)]).then(o.bind(o, 30268))
            }),
        e
      )
    }
    getAppPhases(e) {
      return {
        [p.nh.UNINITIALIZED]: [],
        [p.nh.WAITING]: [
          (async () => {
            await e.getModule(be.default)
          })()
        ],
        [p.nh.LOADING]: [(async () => (await e.getModule(be.default)).waitForPlaying)()],
        [p.nh.STARTING]: [(async () => (await e.getModule(F.default)).waitForFirstRender)()],
        [p.nh.PLAYING]: [(async () => (await e.getModule(F.default)).waitForFlyin)()],
        [p.nh.ERROR]: [this.errorPromise.nativePromise()]
      }
    }
    getStorageProvider() {
      var e, t
      return 0 === (null === (e = Et.t.config) || void 0 === e ? void 0 : e.maas) || "0" === (null === (t = this.urlValues) || void 0 === t ? void 0 : t.mds)
        ? ft.Xq.JSONSTORE
        : ft.Xq.MDS
    }
    setError(e) {
      this.errorPromise.reject(e), this.engineTick && this.engineTick.stop()
    }
    async load(e, t) {
      if (
        ((this.engine = e),
        this.engine.loadModule({
          type: y.default,
          config: { tasks: this.getAppPhases(e) }
        }),
        this.engine.loadModule({ type: G.default, config: { useGUI: !0 } }),
        this.engine.loadModule({ type: dt.default }),
        e.getModule(y.default).then(i => {
          i.updateActiveApp(p.Mx.SHOWCASE), t.coldStart || e.broadcast(new m.pB(p.Mx.SHOWCASE))
        }),
        e.market.waitForData(p.pu).then(t => {
          t.onChanged(async () => {
            const i = this.urlValues.oops
            if (t.phase === p.nh.ERROR || i) {
              const n = t.error,
                s = await e.getModule(Ee.default)
              throw (
                (n instanceof Ve.vx || "unsupported" === i
                  ? s.showError(Ee.ErrorType.UNSUPPORTED)
                  : n instanceof Ve.Gw || "webgl" === i
                  ? s.showError(Ee.ErrorType.WEBGL)
                  : s.showError(Ee.ErrorType.GENERIC),
                n)
              )
            }
          })
        }),
        !t.coldStart)
      )
        return void (this.uiLoading = this.loadUI(!0))
      let n
      xt.info("Showcase app version: 3.1.54.4-0-ga1625c0c3"),
        this.externalCanvas ||
          ((this.canvas = document.createElement("canvas")), (this.canvas.className = "webgl-canvas"), (n = document.querySelector("#canvas-container")))
      const s = document.querySelector("#app-container"),
        r = document.querySelector("main") || document.body,
        o = parseInt(this.urlValues.log, 10)
      this.urlValues.hasOwnProperty("log") && !isNaN(o) && (i.Z.level = o),
        this.quickstart && xt.info("Quickstart engaged. Hold on to your knickers. " + performance.now())
      const a = this.engine.loadModule({
        type: C.default,
        config: {
          baseUrl: this.modelUrls.urlBase,
          apiQueue: this.apiQueue,
          storeQueue: this.storeQueue,
          prefetchedData: "1" !== this.urlValues.acl || "0" !== this.urlValues.prefetch ? At : void 0,
          preloadConfig: "1" !== this.urlValues.acl || "0" !== this.urlValues.prefetch ? "showcase" : void 0
        }
      })
      this.engine.loadModule({
        type: ge.default,
        config: { queue: this.apiQueue }
      }),
        this.engine.loadModule({ type: Ee.default })
      const l = (await a).getApi(),
        c = this.urlValues.applicationKey || this.settingOverrides.applicationKey,
        h = this.loadSdkModule(l, c),
        d = !!c && (await h)
      if (d)
        try {
          await l.modelIsAccessible(this.modelId)
        } catch (e) {
          xt.error(e)
          throw ((await this.engine.getModule(Ee.default)).showError(Ee.ErrorType.GENERIC), e)
        }
      this.engine.loadModuleBySymbol({
        type: g.y.WEBGL_RENDERER,
        config: {
          canvas: this.canvas,
          useWebGL2: "1" === this.urlValues.gl2,
          antialias: "1" === this.urlValues.aa,
          useEffectComposer:
            !(!this.settingOverrides || !this.settingOverrides.hasOwnProperty("useEffectComposer")) && !!this.settingOverrides.useEffectComposer,
          trackTextureUsage: "1" === this.urlValues.trackTextureUsage
        }
      }),
        this.engine.loadModule({ type: I.default }),
        this.engine.loadModule({
          type: b.default,
          config: { container: s }
        }),
        this.engine.loadModuleBySymbol({
          type: g.y.CANVAS,
          config: { canvas: this.canvas, container: n }
        }),
        this.engine.loadModule({ type: mt.default }),
        this.engine.loadModule({ type: de.default })
      const [u, f, v, E] = await Promise.all([e.getModule(C.default), e.getModuleBySymbol(g.y.WEBGL_RENDERER), e.getModule(G.default), e.getModule(I.default)])
      this.engineTick = new EngineTick(this.engine, f.threeRenderer, e => {
        this.engine.getModule(Ee.default).then(t => {
          this.setError(e), t.showError(Ee.ErrorType.GENERIC)
        })
      })
      const M = u.getApi()
      this.apiConfig = await M.getConfigs("showcase")
      const x = new AB(this.apiConfig),
        O = !this.urlValues.applicationKey && ("roomnav_ab" in this.urlValues ? "1" === this.urlValues.roomnav_ab : x.get("roomnav_ab_1"))
      xt.debug("Roomnav AB " + (O ? "enabled" : "disabled"))
      const P = M.user.getFlags("showcase/"),
        N = (0, et.HG)(parseFloat(this.urlValues.wts)),
        { labels: k, mt: B, roomnav: U, play: K, note: ee, searchMode: ce, search: fe, allowRating: Ne, tileset: Le } = this.urlValues,
        Re = M.user.loggedIn
      var He
      const Ge = !(!(He = this.modelId) || 11 !== He.length) && this.getStorageProvider() === ft.Xq.MDS
      ;(this.openingNote = Ge && !!ee), (this.forceLogin = this.openingNote && !Re && !S.yL())
      const qe = !1,
        ht = P.has(Ze.b),
        ut = (0, _t.z)(navigator.language),
        pt = P.has(Je.B) ? "0" !== ce : "1" === ce,
        gt = P.has(Mt.i) ? "0" !== Ne : "1" === Ne,
        vt = this.inWorkshop && Re && gt,
        yt = P.has(ze.iT) ? "0" !== Le : void 0 !== Le
      let Et = this.editModePreferred
      this.editModePreferred && this.forceLogin && (xt.warn("Cannot start in edit mode. Need to login to view note."), (Et = !1))
      const Tt = !("1" !== K && !t.autoPlay && !this.openingNote)
      ;(this.needsFramebustToPlayXR = S.Ot() && !S.PI("xr-spatial-tracking")),
        (this.autoplay = !this.forceLogin && (!S.yL() || (Tt && !this.needsFramebustToPlayXR)))
      const Ot = {
        Features: {
          [$e.U]: !0,
          [ze.AN]: !0,
          [Ye.s]: !0,
          [ze.iT]: yt,
          [je.Nj]: "0" !== k,
          [We.r]: "0" !== B,
          [Xe.ws]: "0" !== this.urlValues.f,
          [Xe.Q5]: (void 0 === U && P.has(Xe.Q5)) || (void 0 !== U && "0" !== U),
          [Qe.EU]: N,
          [Ze.b]: ht,
          [Mt.i]: vt,
          [Je.B]: pt,
          [Ke.R]: qe,
          [St.AR]: P.has(St.AR),
          [Xe.u_]: !O,
          [wt.o]: !O,
          [Xe.gu]: !O
        },
        "User Preferences": {
          [H.F.UnitType]: ut,
          [H.F.MeasurementSnapping]: !0,
          [H.F.MeasurementContinuousLines]: !0,
          [H.F.MeasurementUserNudgeSeen]: !1,
          [H.F.NotesModeNudgeSeen]: !1,
          [H.F.NotesIntroModalSeen]: !1
        }
      }
      for (const e in Ot)
        for (const t in Ot[e]) {
          if (void 0 === Ot[e][t]) continue
          const i = "User Preferences" === e ? G.SettingPersistence.LOCAL_STORAGE : G.SettingPersistence.NONE
          v.registerSetting(e, t, Ot[e][t], !0, i)
        }
      const Dt = {
        [at.YS]: null,
        sid: this.modelId,
        quickstart: this.quickstart,
        lang: this.urlValues.lang,
        perf: this.urlValues.perf,
        perfInterval: this.urlValues.perfInterval
      }
      for (const e in Dt) v.updateSetting(e, Dt[e])
      if (this.settingOverrides) for (const e in this.settingOverrides) v.updateSetting(e, this.settingOverrides[e])
      this.loadInitialAppModules(x, f.gpuInfo, Ot),
        v.hasProperty(We.l) || v.updateSetting(We.l, this.apiConfig.embedly_key),
        d ||
          (await this.loginToModel(this.modelId, M).catch(e => {
            this.setError(e)
          })),
        this.openingNote && (await this.loginToNote()),
        await this.initWorkshopStorage(),
        this.loadInitialDataModules(this.modelId, t)
      const Ct = ((e, t) => new CameraPoseProxy(e, t))(E, (await e.market.waitForData(bt.M_)).pose)
      e.commandBinder.hookCommand(ct.ju, !0, () => this.stopTourHook(e)), e.commandBinder.hookCommand(lt.rU, !0, () => this.stopTourHook(e))
      try {
        await e.waitForLoadingModules()
      } catch (t) {
        this.setError(t), e.tick()
      }
      const [Pt, It] = await Promise.all([e.market.waitForData(T.T), e.market.waitForData(_.O)]),
        { details: Nt, organizationId: Lt } = Pt.model
      document.title = Nt.name
      const Rt = It.pose
      !this.quickstart ||
        (Rt && (0, ye.Bw)(Rt.mode)) ||
        (xt.warn("Disabling quickstart. No panorama start position."), (this.quickstart = !1), v.updateSetting("quickstart", !1))
      const {
        maxMeshQuality: kt,
        navPanoSize: Bt,
        zoomPanoSize: Ut,
        textureLODThreshold: Ft
      } = ((e, t) => {
        let i, n, s, r
        ;(0, S.tq)() || (0, S.w1)()
          ? (0, S.tq)() && (0, nt.W)(t)
            ? ((i = it.S7.ULTRA), (n = st.eE[st.SL.STANDARD]), (s = st.eE[st.SL.HIGH]), (r = 10))
            : ((i = it.S7.MEDIUM), (n = st.eE[st.SL.STANDARD]), (s = st.eE[st.SL.HIGH]), (r = 6))
          : ((i = it.S7.ULTRA), (n = st.eE[st.SL.HIGH]), (s = st.eE[st.SL.ULTRAHIGH]), (r = 20))
        try {
          i = e.maxmeshq ? (0, it.Pm)(parseInt(e.maxmeshq, 10)) : i
        } catch (t) {
          rt.warn(`Not a valid texture size: ${e.maxmeshq}`)
        }
        return (
          (n = e.maxtileq ? parseInt(e.maxtileq, 10) : n),
          (s = e.maxztileq ? parseInt(e.maxztileq, 10) : s),
          (r = e.lodtexth ? parseInt(e.lodtexth, 10) : r),
          {
            maxMeshQuality: i,
            navPanoSize: n,
            zoomPanoSize: s,
            textureLODThreshold: r
          }
        )
      })(this.urlValues, f.gpuInfo)
      xt.info({
        maxMeshQuality: kt,
        navPanoSize: Bt,
        zoomPanoSize: Ut,
        textureLODThreshold: Ft,
        gpuInfo: f.gpuInfo
      }),
        e
          .loadModuleBySymbol({
            type: g.y.SCENE,
            config: { cameraPoseProxy: Ct }
          })
          .then(e => e.startLoading()),
        await this.engine.loadModuleBySymbol({
          type: g.y.SWEEP_PANO,
          config: { navPanoSize: Bt, zoomPanoSize: Ut }
        }),
        await this.engine.loadModule({ type: W.default }),
        this.quickstart && (this.loadPanoControls(Et), this.engineTick.start()),
        await (
          await e.getModule(be.default)
        ).waitForPlaying,
        this.engine.loadModule({
          type: Fe.default,
          config: { container: this.container }
        })
      const Vt = P.has("features/meshtrim") && "0" !== this.urlValues.allowMeshTrim
      Vt &&
        this.engine.loadModuleBySymbol({
          type: g.y.MESH_TRIM_DATA,
          config: {
            modelId: this.modelId,
            baseUrl: this.modelUrls.urlBase,
            queue: this.storeQueue
          }
        }),
        this.engine.loadModuleBySymbol({
          type: g.y.MODEL_MESH,
          config: {
            renderMeshGeometry: !0,
            maxQuality: kt,
            textureLOD: "2" === this.urlValues.texlod ? tt.l.RAYCAST : "0" === this.urlValues.texlod ? tt.l.NONE : tt.l.RAYCAST,
            textureLODThreshold: void 0 !== this.urlValues.texlodthreshold ? parseInt(this.urlValues.texlodthreshold, 10) : Ft,
            colorizeRooms: "1" === this.urlValues.colorizeRooms,
            colorizeChunks: "1" === this.urlValues.colorizeChunks,
            wireframe: "1" === this.urlValues.wireframe,
            meshTrimEnabled: Vt
          }
        }),
        this.engine.loadModule({ type: De.default }),
        this.engine.loadModule({
          type: j.default,
          config: { startingMode: this.quickstart ? ye.Ey.Panorama : null }
        }),
        this.engine.loadModule({
          type: Y.default,
          config: {
            modelId: this.modelId,
            baseUrl: this.modelUrls.urlBase,
            storageProvider: this.getStorageProvider()
          }
        }),
        this.engine.loadModule({ type: L.default }),
        this.engine.loadModule({
          type: q.default,
          config: {
            modelId: this.modelId,
            baseUrl: this.modelUrls.urlBase,
            storageProvider: this.getStorageProvider(),
            readonly: !0,
            queue: this.storeQueue
          }
        }),
        this.engine.loadModule({
          type: Z.default,
          config: {
            allowFloorChanges: Ot.Features[Xe.ws],
            focusBasedNav: Ot.Features[Xe.Q5]
          }
        }),
        this.engine.loadModule({ type: Oe.default }),
        this.engine
          .loadModule({
            type: w.default,
            config: {
              baseUrl: this.modelUrls.urlBase,
              api: M,
              modelId: this.modelId,
              organizationId: Lt || void 0,
              storageProvider: this.getStorageProvider(),
              queue: this.apiQueue
            }
          })
          .then(e => {
            this.loadUserPolicyModules(e, Re, v, P, Ge, qe, Lt || void 0)
          }),
        this.engine.loadModule({
          type: he.default,
          config: {
            workshopApp: this.inWorkshop,
            container: s,
            mainDiv: r,
            queue: this.apiQueue
          }
        }),
        this.engine.loadModule({ type: Ie.default }),
        this.engine.loadModule({ type: pe }),
        this.engine.loadModule({ type: $.default }),
        this.engine.loadModule({
          type: te.default,
          config: { cameraPoseProxy: Ct }
        }),
        this.engine.loadModule({ type: ie.default }),
        this.engine.loadModuleBySymbol({ type: g.y.ORTHOGRAPHIC_CONTROLS }),
        this.engine.loadModule({
          type: ue.default,
          config: {
            enabled: "1" !== this.urlValues.nozoom,
            tiles: "0" !== this.urlValues.tiles
          }
        }),
        this.engine.loadModule({ type: F.default }),
        this.engine.loadModule({
          type: D.default,
          config: {
            enableWheel: "1" === this.urlValues.nozoom,
            focusBasedNav: Ot.Features[Xe.Q5]
          }
        }),
        this.engine.loadModule({ type: Ue.default }),
        this.engine.loadModuleBySymbol({ type: g.y.MESH_QUERY }),
        this.engine.loadModule({
          type: V.default,
          config: {
            modelId: this.modelId,
            baseUrl: this.modelUrls.urlBase,
            storageProvider: this.getStorageProvider(),
            readonly: !0,
            queue: this.storeQueue
          }
        }),
        this.engine.loadModule({ type: Ae.default }),
        this.quickstart || this.engineTick.start(),
        this.quickstart || this.loadPanoControls(Et),
        await this.engine.waitForLoadingModules(),
        "0" !== this.urlValues.portal && (this.engine.loadModule({ type: _e.default }), this.engine.loadModule({ type: we.default })),
        "0" !== this.urlValues.pin && (this.engine.loadModule({ type: xe.default }), this.engine.loadModule({ type: Me.default })),
        this.engine.loadModule({
          type: J.default,
          config: {
            checkRenderModes: () => {
              const t = e.market.tryGetData(z.k3)
              if (t && t.isTourActive()) return !1
              const i = e.market.tryGetData(Pe.O)
              return !!i && i.isInside()
            }
          }
        }),
        this.engine.loadModule({
          type: oe.default,
          config: {
            modelId: this.modelId,
            baseUrl: this.modelUrls.urlBase,
            storageProvider: this.getStorageProvider(),
            readonly: !0,
            queue: this.storeQueue
          }
        }),
        this.engine.loadModule({ type: me.default }),
        this.engine.loadModule({
          type: ke.default,
          config: { newTagsEnabled: qe }
        }),
        this.engine.loadModule({
          type: Be.default,
          config: { debug: "1" === this.urlValues.fcdbg }
        }),
        this.getStorageProvider() === ft.Xq.JSONSTORE &&
          this.engine.loadModule({
            type: ae.default,
            config: {
              modelId: this.modelId,
              baseUrl: this.modelUrls.urlBase,
              readonly: !0,
              queue: this.storeQueue
            }
          }),
        this.engine.loadModule({ type: le.default }),
        this.engine.loadModule({
          type: ne.default,
          config: {
            modelId: this.modelId,
            baseUrl: this.modelUrls.urlBase,
            storageProvider: this.getStorageProvider(),
            readonly: !0,
            parserOptions: {
              model: this.modelId,
              supportLinks: !this.urlValues.mls || "0" === this.urlValues.mls,
              keepLinkLabels: !0
            },
            queue: this.storeQueue
          }
        }),
        this.engine.loadModule({ type: se.default }),
        this.engine.loadModule({ type: re.default }),
        this.engine.loadModule({ type: R.default }),
        this.engine.loadModuleBySymbol({
          type: g.y.TOUR_DATA,
          config: {
            modelId: this.modelId,
            baseUrl: this.modelUrls.urlBase,
            storageProvider: this.getStorageProvider(),
            readonly: !0,
            looping: "1" === this.urlValues.lp,
            queue: this.storeQueue
          }
        }),
        this.engine.loadModuleBySymbol({ type: g.y.TOUR_CONTROLS }),
        this.engine.loadModule({ type: Se.default }),
        this.engine.loadModule({ type: Q.default }),
        this.engine.loadModule({ type: X.default }),
        this.engine.loadModule({ type: ve.default }),
        this.engine.loadModuleBySymbol({ type: g.y.WEBVR }),
        this.engine.loadModuleBySymbol({
          type: g.y.SCAN_INFO,
          config: {
            modelId: this.modelId,
            baseUrl: this.modelUrls.urlBase,
            storageProvider: this.getStorageProvider()
          }
        }),
        this.engine.loadModule({ type: Te.default }),
        this.engine.loadModule({ type: Ce.default }),
        this.engine.loadModule({ type: ot.default }),
        this.engine.loadModuleBySymbol({ type: g.y.VIDEO_RECORDER }),
        this.engine.loadModuleBySymbol({
          type: g.y.MEASUREMENT_MODE,
          config: {
            modelId: this.modelId,
            baseUrl: this.modelUrls.urlBase,
            storageProvider: this.getStorageProvider(),
            readonly: !0
          }
        }),
        this.engine.loadModule({ type: A.default }),
        this.engine.loadModuleBySymbol({ type: g.y.DWELL_ANALYTICS }),
        pt &&
          this.engine.loadModuleBySymbol({
            type: g.y.SEARCH,
            config: { urlSearch: fe, workshop: this.inWorkshop }
          }),
        this.inWorkshop &&
          e.loadModuleBySymbol({
            type: g.y.TRASH,
            config: {
              modelId: this.modelId,
              queue: this.storeQueue,
              baseUrl: this.modelUrls.urlBase
            }
          }),
        this.engine.loadModuleBySymbol({
          type: g.y.WEBXR,
          config: {
            enableEventPositions: !1,
            framebufferScaling: Math.min(this.urlValues.xrframebuffer ? parseFloat(this.urlValues.xrframebuffer) : 0, 1),
            tracking: 0,
            navPanoSize: Bt
          }
        }),
        vt &&
          this.engine.loadModuleBySymbol({
            type: g.y.MODEL_RATING,
            config: {
              modelId: this.modelId,
              baseUrl: this.modelUrls.urlBase,
              queue: this.storeQueue
            }
          })
    }
    loadUserPolicyModules(e, t, i, n, s, r, o) {
      let a = !1
      s && t && ((a = e.isPolicyFlagEnabled(qe.uE)), a && (i.updateSetting(qe.IA, a), i.updateSetting(qe.Mp, a), i.updateSetting(qe.pE, a && n.has(qe.pE)))),
        o &&
          (a || r) &&
          (this.engine.loadModule({
            type: O.default,
            config: {
              apiConfig: this.apiConfig,
              baseUrl: this.modelUrls.urlBase,
              modelId: this.modelId,
              organizationId: o,
              modelUrl: this.modelUrl,
              queue: this.apiQueue
            }
          }),
          a &&
            this.engine.loadModule({
              type: Ne.default,
              config: {
                workshop: this.inWorkshop,
                baseUrl: this.modelUrls.urlBase,
                modelId: this.modelId,
                startingNote: this.urlValues.note,
                readonly: !1
              }
            }),
          r && this.engine.loadModule({ type: Re.default }),
          this.engine.loadModule({ type: Le.default }))
    }
    async unload(e) {
      try {
        await e.commandBinder.issueCommand(new lt.vy())
      } catch (e) {
        xt.debug("showcase unload called before tour controls registered, ignoring stopTour", e)
      }
      await this.uiLoading,
        await this.showcaseGui.unloadUi().catch(e => {
          xt.error(e)
        }),
        e.commandBinder.resetHooks()
    }
    async loginToModel(e, t) {
      xt.info(`Loading model ${e}`)
      const i = this.forceLogin
      await t.modelExists(e, { ignorePrefetch: i }).catch(async e => {
        if (i && (e instanceof ut.GT || e instanceof ut.V2)) await this.showLoginScreen()
        else {
          if (!(e instanceof ut.GT)) throw e
          await this.login()
        }
      })
    }
    async loginToNote() {
      const e = this.modelId
      this.forceLogin && (await this.showLoginScreen(e))
    }
    async initWorkshopStorage() {
      this.inWorkshop &&
        this.getStorageProvider() === ft.Xq.MDS &&
        (await this.engine.getModule(gt.F), await this.engine.commandBinder.issueCommand(new vt.dS({ viewType: ft.XZ.SESSION })))
    }
    loadInitialAppModules(e, t, i) {
      this.engine.loadModule({ type: K.default }),
        this.engine.loadModuleBySymbol({
          type: g.y.INPUT,
          config: {
            disableWheel: "0" === this.urlValues.wh,
            pointerPreventDefault:
              !this.settingOverrides || !this.settingOverrides.hasOwnProperty("pointerPreventDefault") || !!this.settingOverrides.pointerPreventDefault
          }
        }),
        this.engine.loadModuleBySymbol({
          type: g.y.SHOWCASE_ANALYTICS,
          config: {
            appName: (this.settingOverrides && this.settingOverrides.appName) || "showcase",
            provider: this.urlValues.analytics,
            additionalValues: { ab_tests: e.serialize(), gpu: t },
            apiQueue: this.apiQueue,
            analyticsQueue: this.analyticsQueue
          }
        })
      let n = i.Features[St.AR] ? ft.hV.CACHE : ft.hV.NONE
      const s = this.urlValues.prefetch
      s && Object.values(ft.hV).includes(s) && (n = s),
        this.engine.loadModule({
          type: gt.F,
          config: {
            modelId: this.modelId,
            mdsEnabled: this.getStorageProvider() === ft.Xq.MDS,
            prefetchPolicy: n,
            baseUrl: this.apiHost
          }
        })
    }
    loadInitialDataModules(e, t) {
      const i = this.settingOverrides.disableMobileRedirect || !(S.tq() || this.needsFramebustToPlayXR),
        n = !!this.openingNote || void 0,
        s = !!this.openingNote || void 0,
        r = !!this.openingNote || void 0
      this.engine.loadModule({
        type: be.default,
        config: {
          noUi: this.forceLogin,
          inWorkshop: this.inWorkshop,
          modelId: this.modelId,
          baseUrl: this.modelUrls.urlBase,
          quickstart: this.quickstart,
          autoplay: this.autoplay,
          allowPlayInIframe: i,
          startNewTab: "1" === this.urlValues.nt,
          hideTitle: s,
          hideBranding: r,
          hidePoweredBy: n
        }
      }),
        this.engine.loadModule({
          type: x.default,
          config: {
            modelId: this.modelId,
            baseUrl: this.modelUrls.urlBase,
            storageProvider: this.getStorageProvider(),
            readonly: !0,
            queue: this.storeQueue
          }
        }),
        this.engine.loadModule({
          type: M.default,
          config: {
            modelId: this.modelId,
            baseUrl: this.modelUrls.urlBase,
            storageProvider: this.getStorageProvider(),
            readonly: !0,
            queue: this.storeQueue
          }
        }),
        this.engine.loadModule({
          type: E.default,
          config: {
            modelId: this.modelId,
            baseUrl: this.modelUrls.urlBase,
            storageProvider: this.getStorageProvider(),
            readonly: !0,
            queue: this.storeQueue,
            privledgedSignedUrls: "1" === this.urlValues.acl
          }
        }),
        this.engine.loadModule({
          type: N.default,
          config: {
            modelId: this.modelId,
            baseUrl: this.modelUrls.urlBase,
            storageProvider: this.getStorageProvider(),
            readonly: !0,
            queue: this.storeQueue
          }
        })
    }
    loadPanoControls(e) {
      ;(this.uiLoading = this.loadUI(!(e || this.forceLogin))), this.engine.loadModule({ type: ce.default }), this.engine.loadModule({ type: ee.default })
    }
    async loadSdkModule(e, t) {
      const i = this.engine
      async function n() {
        return "./sdk/sdk-client.js"
      }
      async function s(t) {
        const n = await o.e(838).then(o.bind(o, 12629))
        await n.loadInterface(t, i, e)
      }
      return new Promise(async e => {
        await i.loadModuleBySymbol({
          type: g.y.SDK,
          config: {
            applicationKey: t || null,
            validationUrl: this.apiHost + "/api/v1/user/",
            getClientScriptUrl: n,
            setupExternalSdk: s,
            onClientConnect(t) {
              t && pt.w.setToken(t), e(!!t)
            },
            queue: this.apiQueue
          }
        })
      })
    }
    loadUI(e) {
      return Promise.all([this.engine.getModule(he.default), this.engine.getModule(pe)]).then(([t, i]) => {
        ;(this.guiModule = t), (this.showcaseGui = i), e && t.loadUi(i.loadUi)
      })
    }
    async showLoginScreen(e) {
      var t, i
      this.engine.loadModule({
        type: k.default,
        config: {
          loginUrl: (null === (t = this.apiConfig) || void 0 === t ? void 0 : t.authn_login_url) || "",
          registerUrl: (null === (i = this.apiConfig) || void 0 === i ? void 0 : i.account_register_url) || "",
          modelId: e,
          baseUrl: this.modelUrls.urlBase,
          container: this.container
        }
      })
      return (await this.engine.getModule(k.default)).loadUi()
    }
    login() {
      return new Promise(async e => {
        this.engine.loadModule({
          type: B.default,
          config: {
            modelId: this.modelId,
            baseUrl: this.modelUrls.urlBase,
            container: this.container
          }
        })
        const t = await this.engine.getModule(B.default)
        this.engine.subscribe(U.L, () => {
          t.hidePasswordScreen(), e()
        }),
          t.showPasswordScreen()
      })
    }
  }
  o(21492)
  var Ot,
    Dt,
    Ct,
    Pt,
    It = o(8684)
  !(function (e) {
    const t = new It.M()
    e.connect = async function (e, i) {
      let n
      try {
        n = await e.connect()
      } finally {
        e.cancelConnecting()
      }
      return (function (e, t, i) {
        return new e(t).build(i)
      })(
        await (async function (e) {
          if (!e) throw new Error("Unabled to load the sdk")
          try {
            const i = await t.load(e, "sdk-client")
            if (i && i.SdkBuilder && "function" == typeof i.SdkBuilder) return i.SdkBuilder
          } catch (e) {}
          throw Error(`Could not load the sdk from ${e}`)
        })(n.scriptUrl),
        i.getFactory(n),
        n.serializedInterface
      )
    }
  })(Ot || (Ot = {})),
    (function (e) {
      e.CONNECT = "postmessage.connect"
    })(Dt || (Dt = {})),
    (function (e) {
      ;(e.HANDSHAKE = "postmessage.handshake"), (e.ACCEPT = "postmessage.accept"), (e.REJECT = "postmessage.reject")
    })(Ct || (Ct = {}))
  !(function (e) {
    ;(e[(e.IDLE = 0)] = "IDLE"),
      (e[(e.CONNECTING = 1)] = "CONNECTING"),
      (e[(e.HANDSHAKE = 2)] = "HANDSHAKE"),
      (e[(e.CONNECTED = 3)] = "CONNECTED"),
      (e[(e.REJECTED = 4)] = "REJECTED")
  })(Pt || (Pt = {}))
  //读取配置
  window.addEventListener(
    "app-start",
    e => {
      !(function (e) {
        const t = new Engine(),
          i = new Showcase(!1, e)
        t.loadApplication(i, i.setError.bind(i)), S.Jm() || document.body.classList.add("no-touch")
        !(function (e) {
          class BundleSdkBootstrap {
            async connect(t, i = {}) {
              const n = await e.getModuleBySymbol(g.y.SDK)
              return Ot.connect(new BundleConnector(n, i), new BundleMessengerFactoryFetcher())
            }
          }
          window.MP_SDK = new BundleSdkBootstrap()
        })(t)
      })(e.detail.config || {})
    },
    !0
  )
  class BundleConnector {
    constructor(e, t) {
      ;(this.sdk = e), (this.options = t)
    }
    connect() {
      return this.sdk.connect(`${window.location.protocol}//${window.location.host}`, this.options)
    }
    cancelConnecting() {}
  }
  class BundleMessengerFactoryFetcher {
    getFactory(e) {
      return e.messengerFactory
    }
  }
})()
